require.config({
                baseUrl:"../",
	paths:{
		bsl:'bsl',

	}
});
require(['bsl'],function(bsl){
	document.addEventListener('deviceready', onDeviceready, false);
        function onDeviceready(){
            alert("star");
            
            function alertDismissed() {
            // do something
            }
            
            // Show a custom alertDismissed
            //
            function showAlert() {
                navigator.notification.alert(
                                         'You are the winner!',  // message
                                         alertDismissed,         // callback
                                         'Game Over',            // title
                                         'Done'                  // buttonName
                                         );
            }
            
            // Beep three times
            //
            function playBeep() {
                bsl.notification.beep(3);
            }
            
            // Vibrate for 2 seconds
            //
            function vibrate() {
                bsl.notification.vibrate(2000);
            }
        
            function onPrompt(results) {
                alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
            }
            
            // Show a custom prompt dialog
            //
            function showPrompt() {
                navigator.notification.prompt(
                                          'Please enter your name',  // message
                                          onPrompt,                  // callback to invoke
                                          'Registration',            // title
                                          ['Ok','Exit'],             // buttonLabels
                                          'Jane Doe'                 // defaultText
                                          );
            }
            function onConfirm(buttonIndex) {
                alert('You selected button ' + buttonIndex);
            }
            
            // Show a custom confirmation dialog
            //
            function showConfirm() {
                navigator.notification.confirm(
                                           'You are the winner!', // message
                                           onConfirm,            // callback to invoke with index of button pressed
                                           'Game Over',           // title
                                           'Restart,Exit'         // buttonLabels
                                           );
            }
        
        document.getElementById("showAlert").addEventListener("click",showAlert,false);
        document.getElementById("playBeep").addEventListener("click",playBeep,false);
        document.getElementById("vibrate").addEventListener("click",vibrate,false);
        document.getElementById("showPrompt").addEventListener("click",showPrompt,false);
        document.getElementById("showConfirm").addEventListener("click",showConfirm,false);
        }
});